home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club (Business) 1997 July / Software of the Month Club - Business (Volume 239) (July 1997).iso / pc / code / shared.dxr / 04484_load Objects code.ls < prev    next >
Encoding:
Text File  |  1996-02-21  |  1.5 KB  |  36 lines

  1. global gObjectsA, gObjectsB, gObjectsC, gObjectsD, gObjectsE, gObjectsF, gObjectsG, gObjectsH, gWorld, gStates, gOBJECTS, gHotRects, gScreenState, gCursorList, gTimerList, gKeyRef, cNullCast, cNullQTmovie, NULLRECT, gSpritePropTypes, sPICTSPRITE, sQTSPRITE, sCURSORSPRITE, sCPSprite, sQTCharSprite, gUnvObjects, void, gLastCursor, gPlayingQT, gTransMovieName, gAnimationObjects, gDeathRow, gLastKeyList, gKeyFrameSound, gEnvironmentSound, gKeyFrameSoundMode, gKeyExitSound, gHaveNavs, gNextEnvLetter, gNextDIRFile, gMIDIPlayTRUE, gInitalized, noteObjs, windowsMIDIXObj, xNAVXOBJ, xCURXOBJ, gCPU, gfileSep, gRootPath, gHDpath, gXobjs, gXOBJPath, gCDpath, gCDName
  2.  
  3. on RebuildgOBjects NumFields
  4.   put "starting"
  5.   set mystartTime to the timer
  6.   set gOBJECTS to [:]
  7.   sort(gOBJECTS)
  8.   set Start to the ticks
  9.   repeat with aCount = 1 to NumFields
  10.     set fieldName to "ObjectField" & aCount
  11.     set Templist to value(the text of field fieldName)
  12.     sort(Templist)
  13.     CombineADDList(gOBJECTS, Templist)
  14.   end repeat
  15.   put the timer - mystartTime && "stopTime"
  16. end
  17.  
  18. on CombineADDList Tolist, FromList
  19.   set C to count(FromList)
  20.   repeat with X = 1 to C
  21.     set obj to getAt(FromList, X)
  22.     setaProp(Tolist, getPropAt(FromList, X), obj)
  23.   end repeat
  24. end
  25.  
  26. on RebuildgWorld
  27.   set gWorld to [:]
  28.   sort(gWorld)
  29.   set Start to the ticks
  30.   repeat with letter in ["A", "B", "C", "D", "E", "F", "G", "H"]
  31.     set fieldName to string("WorldField" & letter)
  32.     set temp to value(string(the text of field fieldName))
  33.     CombineADDList(gWorld, temp)
  34.   end repeat
  35. end
  36.